<template>
    <el-table
            v-bind="$attrs"
            class="table-simple white-header-table"
            :data="tableData.data"
            stripe>
        <el-table-column v-for="{label, prop, minWidth, sortable} in tableData.column" :key="prop"
                         :prop="prop"
                         :label="label"
                         :sortable="sortable"
                         :min-width="minWidth">
        </el-table-column>
    </el-table>
</template>

<script>
export default {
  name: 'TableSimple',
  props: {
    tableData: {
      type: Object,
      default: () => {
        return {}
      }
    }
  },
  data () {
    return {}
  }
}
</script>

<style lang="scss" scoped>
    @import "~element-theme-chalk/src/common/var.scss";
    @import "@/assets/scss/modules/variables-module.scss";

    .el-table {
        display: flex;
        flex-flow: column;

        ::v-deep {
            .el-table__header-wrapper {
                flex-shrink: 0;
            }

            .el-table__body-wrapper {
                overflow: auto;
                min-height: 0;
            }
        }
    }
</style>
